﻿using FastEndpoints;
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace vite_services.Dict
{
    public sealed class Request
    {
        public string Type { get; set; } = string.Empty;

        internal sealed class DictValidator : Validator<Request>
        {
            public DictValidator()
            {
                RuleFor(x => x.Type)
                .NotEmpty()
                .WithMessage("Type不能为空!");
            }
        }
    }

    public sealed class Response
    {
        public long Id { get; set; }
        public string Label { get; set; } = string.Empty;
        public string Value { get; set; } = string.Empty;
        public List<Response> Children { get; set; } = new List<Response>();
    }
}
